﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Roslyn.Compilers.Common;
using Roslyn.Services;

namespace Roslyn.Compiler.Extension
{
    public class ReferencesStack : Stack<KeyValuePair<ISymbol, IEnumerable<ReferencedSymbol>>>
    {
        /// <summary>
        /// Pushes all nodes of the given stack to the current stack.
        /// Roland Ellerweg: Changed to Symbol and Reference Locations
        /// </summary>
        /// <param name="pNodesToAdd">The stack hodling the nodes to be pushed ont the other stack.</param>
        /// <param name="pNewType">New type of the p.</param>
        /// <author>
        /// Harald Binkle
        /// </author>
        public void Push(ISymbol symbol, IEnumerable<ReferencedSymbol> locations)
        {

            this.Push(new KeyValuePair<ISymbol, IEnumerable<ReferencedSymbol>>(symbol, locations));
            
        }

        //public void PushAll(ReferencesStack pStack)
        //{
        //    foreach (var reference in pStack)
        //    {
        //        this.Push(reference);
        //    }
        //}

    }
}
